#include "RandomUtil.h"
#include <iostream>
#include <ctime>
#include <cstdlib>


unsigned int RandomUtil::random(unsigned int s) {
/*	const unsigned int A=1664525;
	const unsigned int C=1013904223;
	seed = (A*s+C) & 0xffffffff;
	return seed;
	*/
	srand(s);
	return random();
}

unsigned int RandomUtil::random(void) {
	return rand();
}

unsigned int RandomUtil::random(unsigned int min, unsigned int max) {
	return (random() % (max - min + 1)) + min;
}

unsigned int RandomUtil::random(unsigned int min, unsigned int max, unsigned int s) {
	return random(s) % (max - min + 1) + min;
}

//unsigned int RandomUtil::seed = 0;

/*
int main(void) {
	for(int i = 0; i < 10000000; i++) {
		unsigned int d = RandomUtil::random();
		if(d < 0x00000fff) {
			std::cout << d;
			std::cout << "\n";
		}
	}
	int i;
	std::cin >> i;
}
*/